import request from "@/utils/request";

export function getInspectionItemByPage(query) {
  return request({
    url: `/system/inspectionItem/getInspectionItemByPage`,
    method: "post",
    data: query,
  });
}

// 增加流程模型

export function addInspectionItem(query) {
  return request({
    url: `/system/inspectionItem/addInspectionItem`,
    method: "post",
    data: query,
  });
}
/**
 *
 * @param {*} query
 * @returns
 */
export function delInspectionItem(query) {
  return request({
    url: `/system/inspectionItem/delInspectionItem`,
    method: "post",
    data: query,
  });
}

export function updateInspectionItem(query) {
  return request({
    url: `/system/inspectionItem/updateInspectionItem`,
    method: "post",
    data: query,
  });
}

// export function uploadInspectionItem(query) {
//   return request({
//     url: `/system/inspectionItem/uploadInspectionItem`,
//     headers: { "Content-Type": "application/x-www-form-urlencoded" },
//     method: "POST",
//   });
// }
export function uploadInspectionItem(params) {
  return request("/system/inspectionItem/uploadInspectionItem", {
    method: "POST",
    data: params,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
  });
}
